package durst.data;

import com.j256.ormlite.dao.ForeignCollection;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.field.ForeignCollectionField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName="Child")
public class Child extends Object {
	@DatabaseField(generatedId = true)
	private int id; 
	
	@DatabaseField(foreign = true, columnName="parent_id") 
	private Parent parent; 
	
	@ForeignCollectionField
	private ForeignCollection<Grandchild> children; 
	 
	public Child() {
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Parent getParent() {
		return parent;
	}

	public void setParent(Parent parent) {
		this.parent = parent;
	}

	public ForeignCollection<Grandchild> getChildren() {
		return children;
	}
}
